package com.tlgen.service;

import com.tlgen.mapper.SalaryMapper;
import com.tlgen.model.Salary;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: tlgen
 * @Discription:
 */
@Service
public class SalaryService {

    @Autowired
    SalaryMapper salaryMapper;

    public List<Salary> getAllSalarys() {
        return salaryMapper.getAllSalarys();
    }

    public Integer deleteSalaryByIds(Integer[] ids) {
        return salaryMapper.deleteSalaryByIds(ids);
    }

    public Integer deleteSalaryById(Integer id) {
        return salaryMapper.deleteByPrimaryKey(id);
    }

    public Integer updateSalary(Salary salary) {
        return salaryMapper.updateByPrimaryKeySelective(salary);
    }

    public Integer addSalary(Salary salary) {
        return salaryMapper.insertSelective(salary);
    }
}
